package com.lemon.smartsafetynew.entity.monitor;

import java.io.Serializable;

/**
 * Created by Andrew on 2017/8/7.
 */

public class MonitorDetailItemVo implements Serializable {

    private String name;
    private String unit;
    private String status;//状态名称
    private String statusCode;//状态代码
    private String id;
    private String type; //0为数字型，1为状态型
    private String value;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getStatus() {
        if (statusCode != null) {
            if (statusCode.equals("0")) {
                return "正常";
            } else if (statusCode.equals("1")) {
                return "偏高";
            } else if (statusCode.equals("2")) {
                return "偏低";
            } else if (statusCode.equals("3")) {
                return "异常";
            } else if (statusCode.equals("6")) {
                return "无响应";
            } else {
                return "未知";
            }

        } else {
            return "未能获得状态！";
        }
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
